<?php






echo "</br>Unmarried family members:</br>";
$current_turn = '1';



foreach ($data as $key => $row) {
    
    echo form_open('family/find_spouse');
    //echo ($row->getName()) . ($row->getId());
    $name = $row -> getName();
    $born_turn = $row -> getBornDate();
    $married_to = $row-> getMarriedTo();
    $is_female = $row -> getIsFemale();
    
    $abs_diff = abs($current_turn - $born_turn);
    //echo $test_diff . " - " . $born_turn;
    $age = $abs_diff / 8;
    
    echo "   > " . $name . ", aged " . $age . " years, born on turn " . $born_turn . ".   ";
    
    echo form_hidden('char1id', $row -> getId());
    echo form_submit('submit','Marry');
    echo form_close();
    
    
    echo "</br>";
}

